package org.clusterbomb.core.engine;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

import org.clusterbomb.core.job.DeploymentJob;

public class ThreadedDeploymentEngine implements DeploymentEngine {

	
	private final ExecutorService executorService;
	
	
	public ThreadedDeploymentEngine(int threadCount) {
		executorService = Executors.newFixedThreadPool(threadCount);
	}
	
	@Override
	public void deploy(DeploymentJob job) throws Exception {
		
		//add job setup crap
		JobExecutor jobRunner = new JobExecutor(null, null);
		executorService.execute(jobRunner);

	}

}
